/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class OnewayDrawCurtain {
    static categoryCode = '010010003';

    static categoryName = '单开窗帘';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return OnewayDrawCurtain.categoryCode;
    }

    get categoryName() {
        return OnewayDrawCurtain.categoryName;
    }

    getCurrentPosition(params) {
        return command({
            method: 'getCurrentPosition',
            methodId: 'pDrhxkR5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMotorDirection(params) {
        return command({
            method: 'getMotorDirection',
            methodId: 'ptRSARhw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSelfStarting(params) {
        return command({
            method: 'getSelfStarting',
            methodId: 'pghzV1xm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pGoxuvPK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTargetPosition(params) {
        return command({
            method: 'getTargetPosition',
            methodId: 'p1vFkqnl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWorkStatus(params) {
        return command({
            method: 'getWorkStatus',
            methodId: 'phEqZoFP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMotorDirection(params) {
        return command({
            method: 'setMotorDirection',
            methodId: 'pZgRgHdM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSelfStarting(params) {
        return command({
            method: 'setSelfStarting',
            methodId: 'pUPQQiJn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peHyXj6E',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTargetPosition(params) {
        return command({
            method: 'setTargetPosition',
            methodId: 'ppAXpys9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default OnewayDrawCurtain;
